<template>
  <div>
    <div>父组件</div>
    <ChildVue
      @submit="submit"
      @submitAttr="submitAttr"
      @emitMethod="emitMethod"
    ></ChildVue>
  </div>
</template>

<script>
import ChildVue from "./ChildVue.vue";
// eslint-disable-next-line no-unused-vars
import MyNotification from "@/components/MyNotification";
export default {
  components: {
    ChildVue,
  },
  methods: {
    submit() {
      MyNotification.success("提示", "提交成功");
    },
    submitAttr(num) {
      MyNotification.success("提示", `传递参数:${num}`);
    },
    emitMethod(num) {
      MyNotification.success("提示", `传递参数:${num}`);
    },
  },
};
</script>

<style></style>
